class_name DurationEffectComponentAsset
extends GameplayEffectComponentAsset

## 持续时间刷新策略
enum DurationRefreshPolicy {
    None,
    AfterBeingAttached,
    StackUpdated,
}

## 效果持续时间刷新策略
@export var duration_refresh_policy: DurationRefreshPolicy

## 效果激活时所赋予的标签
@export var granted_tags: Array[String]

## 效果激活时所赋予的能力
@export var granted_abilities: Array[GameplayAbilityAsset]

## 效果持续时间，设置 0 表示持续时间无限
@export_range(0, 1000, 0.1, "or_greater") var duration: float


func get_component_name() -> String:
    return "DurationEffectComponent"


func create_spec() -> GameplayEffectComponent:
    return DurationEffectComponent.new(self)
